package org.wen.soft.asm.model;

import lombok.Data;

import java.util.ArrayList;
import java.util.List;

@Data
public class LoadParameter {
    String name;
    int access;
    int index;
    String descriptor;

    List<LoadAnnotation> loadAnnotations = new ArrayList<>();


    public LoadParameter() {
    }

    public LoadParameter(int index, String descriptor) {
        this.index = index;
        this.descriptor = descriptor;
    }


    public void setNameAndAccess(String name, int access) {
        this.name = name;
        this.access = access;
    }

    public void addLoadAnnotation(LoadAnnotation loadAnnotation) {
        loadAnnotations.add(loadAnnotation);
    }
}
